package com.project.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 供应商的供货单
 */
@Data
@TableName("t_supply_order")
public class SupplyOrderEntity implements Serializable {

    @TableId(value = "pk_supplyId", type = IdType.AUTO)
    private long supplyId;//id

    @TableField("s_supplyRef")
    private long supplyRef;//供货单编号

    @TableField("fk_supplierRef")
    private long supplierRef;//供应商编号

    @TableField("fk_confirmRef")
    private long confirmRef;//中标确认单编号

    @TableField("s_pact")
    private String pact;//合同号

    @TableField("s_batch")
    private String batch;//供货批次

    @TableField("s_supplierName")
    private String supplierName;//供应商名称

    @TableField("s_status")
    private int status ;//订单状态码,    1 发货  2 已完成

    @TableField("s_dateTime")
    private LocalDateTime dateTime ;//发货时间

    @TableField("s_address")
    private String address;//收获地址

    @TableField("s_money")
    private double money;//总金额

    @TableField(exist = false)
    private List<SupplyGoodsEntity> supplyGoodsEntityList;//供货单的所有商品

    @TableField(exist = false)
    private  ConfirmOrderEntity confirmOrderEntity;//供货单对应的中标确认订单

    @TableField(exist = false)
    private  SupplierEntity supplierEntity ;//供货单对应的供应商

    @TableField(exist = false)
    private  SupplyRefundEntity supplyRefundEntity ;//供货单对应的退货单

}
